package javawdw.io.zip;

import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import java.util.zip.ZipFile;

public class Zip extends ZipFile implements IZip {
	public Zip(String file) throws IOException {
		this(new File(file));
	}

	public Zip(File file) throws IOException {
		super(file);
	}

	public void accept(Goal goal) {
		goal.visit(this);
		Enumeration<? extends java.util.zip.ZipEntry> iterator = this.entries();
		while (iterator.hasMoreElements()) {
			ZipElement zipEntry = new ZipElement(iterator.nextElement());
			zipEntry.accept(goal);
		}
	}
}